
describe('practice-4-3', function () {


    it("find hash table, it is succ", function () {
        console.log("create open link hash table, table size is 137");
        var hash_table = HashTable.create_hash_table_for_test(137);
        var index1 = hash_table.insert_str_from_hash_for_test('abc');
        var index2 = hash_table.insert_str_from_hash_for_test('bac');
        var find_info = hash_table.find_str_from_hash('bac');
        expect(find_info.row ).toEqual(20);
        expect(find_info.column ).toEqual(1);
        find_info = hash_table.find_str_from_hash('abc');
        expect(find_info.row ).toEqual(20);
        expect(find_info.column ).toEqual(0);
    });

    it("find hash table, it is fails", function () {
        console.log("create open link hash table, table size is 137");
        var hash_table = HashTable.create_hash_table_for_test(137);
        var index1 = hash_table.insert_str_from_hash_for_test('abc');
        console.log(index1);
        var find_info = hash_table.find_str_from_hash('bac');
        console.log(find_info);
        expect(find_info.row).toEqual(20);
        expect(find_info.column).toEqual(-1);
    });
});